import request from './request.js'

const user = {
  // 验证手机号
  verifyMobile(data) {
    return request.post('/bussiness/Login/GetLoginedMobile', data)
  },

  // 验证是否注册
  isRegister(data) {
    return request.post('/common/Account/IsOldUser', data)
  },

  // 密码登录
  passwordLogin(data) {
    return request.post('/bussiness/Login/Login', data)
  },

  // 获取验证码
  sendCode(data) {
    return request.post('/bussiness/Login/sendidentitycode', data)
  },

  //快捷登录
  quickLogin(data) {
    return request.post('/bussiness/Login/QuickLogin', data)
  },

  //获取用户信息
  getUserInfo() {
    return request.post('/bussiness/UserInfo/GetUserInfo')
  },

  //保存imei信息
  saveImei(data) {
    console.log('保存imei：' + data)
    return request.post('/bussiness/Login/UpdateMobileImei', data)
  },

  //公司联想查询-企查查
  qccSearch(data) {
    return request.post('/bussiness/UserInfo/QccVagueSearch', data)
  },

  //公司联想查询-已注册
  registedSearch(data) {
    return request.post('/bussiness/UserInfo/SearchCompany', data)
  },

  //公司是否已注册
  companyIsExist(data) {
    return request.post('/bussiness/UserInfo/CheckCompanyIsExist', data)
  },

  //企业注册
  register(data) {
    return request.put('/bussiness/UserInfo/SetPassWord', data)
  },

  //用户是否个人信息认证
  isCurrentUserIdentity(data) {
    return request.post('/business/Account/IsCurrentUserIdentity', data)
  },

  //用户公司名称查询
  getUserCompany() {
    return request.post('/bussiness/UserInfo/GetPostCompanyName')
  },

  //用户认证姓名查询
  getIdentityName() {
    return request.post('/bussiness/UserInfo/GetIdentityName')
  },

  //图片上传
  uploadFile(data) {
    return request.post(
      'https://ztcapi.yzsheng.com/UpYun/UploadReceiptImgUpyunConfig',
      data
    )
  },

  //个人信息认证保存
  userIdentity(data) {
    return request.post('/bussiness/UserInfo/UserIdentity', data)
  },

  //营业照图片读取
  readLicense(data) {
    return request.post('/bussiness/UserInfo/ReadLicense', data)
  },

  //企业信息认证保存
  companyIdentity(data) {
    return request.post('/bussiness/UserInfo/OpenCompany', data)
  },

  //认证状态查询
  auditInviteSatus(data) {
    return request.post('/business/Account/AuditInviteSatus', data)
  },

  //修改密码
  pwdSendCode(data) {
    return request.post('/bussiness/UserInfo/UpdateMobileSendCode', data)
  },

  //修改密码
  updatePassword(data) {
    return request.put('/bussiness/UserInfo/UpdatePassword', data)
  },

  //修改手机号
  updateMobile(data) {
    return request.post('/bussiness/UserInfo/UpdateMobile', data)
  },

  //意见
  addComplaint(data) {
    return request.post('/bussiness/UserInfo/AddComplaint', data)
  },

  //获取图片上传配置
  getImageConfig() {
    return request.post('/bussiness/Common/UploadAuthImgUpyunConfig')
  },

  //获取文件上传配置
  getFileConfig(data) {
    return request.post('/bussiness/Common/UploadReceiptFileUpyunConfig', data)
  },

  //资产
  getAssets(data) {
    return request.post(
      '/api/business/core/AssetsManagement/AssetsManagementInfomation',
      data
    )
  },

  //资产列表
  getAssetsList(data) {
    return request.post(
      '/api/business/core/AssetsManagement/AssetsListDataList',
      data
    )
  },

  //账单详情
  getAssetsDetail(data) {
    return request.post(
      '/api/business/core/AssetsManagement/AssetsDetailsDataList',
      data
    )
  },

  //交易列表
  getTradingList(data) {
    return request.post(
      '/api/business/core/AssetsManagement/AssetsUnderwayListDataList',
      data
    )
  },

  //银行卡列表
  getBankCardList(data) {
    return request.post('/business/AccountBank/GetBankCardList', data)
  },

  //银行卡-对公账号名称
  getCompanyName() {
    return request.post('/business/AccountBank/GetCompanyNameByUid')
  },

  //添加银行卡
  addNewBank(data) {
    return request.post('/business/AccountBank/AddNewBank', data)
  },

  //
  getBankInfo(data) {
    return request.post('/business/AccountBank/ReadBank', data)
  },
  // 修改支付密码发送验证码
  UpdatePayPwdSendMsg(data) {
    return request.get('/business/Account/UpdatePayPwdSendMsg', data)
  },
  // 是否设置支付密码
  IsExistPayPwd(data) {
    return request.post('/business/Account/IsExistPayPwd', data)
  },
  // 设置支付密码
  SetPayPassword(data) {
	  return request.post('/business/Account/SetPayPassword', data)
  },
  IsCurrentUserIdentityAndDeparture(data){
    return request.post('/business/Account/IsCurrentUserIdentityAndDeparture', data)
  },
  // 申请加入公司短信
  ApplyJoin(data){
		  return request.post('/business/Account/ApplyJoin', data)
  },
  // 选择公司
  LoginChooseStore(data){
		  return request.post('/business/Account/LoginChooseStore', data)
  },
  // 新增编辑unipush客户端数据源
  AddOrEditUniPush(data){
  	  return request.post('/api/common/core/Account/AddOrEditUniPush', data)
  },
}

export default user
